﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace Player
{
    [View("Session")]
    public enum SessionTable
    {
        [Column(SqlDbType.BigInt)]
        Id,
        [Column(SqlDbType.UniqueIdentifier)]
        Zone,
        [Column(SqlDbType.NVarChar, 255)]
        MachineName,
        [Column(SqlDbType.BigInt)]
        MachineAddress,
        [Column(SqlDbType.NVarChar, 255)]
        MachinePrincipal,
        [Column(SqlDbType.UniqueIdentifier)]
        SessionId,
        [Column(SqlDbType.Bit)]
        IsHeadRecord,
        [Column(SqlDbType.VarBinary, 85)]
        AgentSid,
        [Column(SqlDbType.NVarChar, 64, true)]
        TimeZone,
        [Column(SqlDbType.DateTime)]
        StartTime,
        [Column(SqlDbType.BigInt)]
        TimeStampOffset,
        [Column(SqlDbType.NVarChar, 511)]
        UserName,
        [Column(SqlDbType.NVarChar, 50)]
        UnixName,
        [Column(SqlDbType.NVarChar, 255)]
        DisplayName,
        [Column(SqlDbType.Bit)]
        IsAdUser,
        [Column(SqlDbType.VarBinary, 85)]
        AdUserSid,
        [Column(SqlDbType.NVarChar, 128)]
        Tty,
        [Column(SqlDbType.NVarChar, 255)]
        ClientName,
        [Column(SqlDbType.BigInt)]
        ClientAddress,
        [Column(SqlDbType.Int)]
        State,
        [Column(SqlDbType.DateTime, true)]
        EndTime,
        [Column(SqlDbType.Int)]
        AuditStoreId,
        [Column(SqlDbType.NVarChar, 64)]
        AuditStoreName,
        [Column(SqlDbType.Int)]
        AuditDatabaseId,
        [Column(SqlDbType.Bit)]
        AgentConnected,
        [Column(SqlDbType.TinyInt, false)]
        SessionType
    }

    [View("WashEvent")]
    public enum WashEvent
    {
        [Column(SqlDbType.BigInt)]
        Id,
        [Column(SqlDbType.UniqueIdentifier)]
        SessionId,
        [Column(SqlDbType.Int)]
        SequenceNumber,
        [Column(SqlDbType.BigInt)]
        SystemTime,
        [Column(SqlDbType.BigInt)]
        TimeStamp,
        [Column(SqlDbType.TinyInt)]
        Event,
        [Column(SqlDbType.Int)]
        Pid,
        [Column(SqlDbType.BigInt)]
        WindowId,
        [Column(SqlDbType.NVarChar, 512, true)]
        Module,
        [Column(SqlDbType.NVarChar, -1, true)] // nvarchar(max)
        Text,
        [Column(SqlDbType.Int)]
        X,
        [Column(SqlDbType.Int)]
        Y,
        [Column(SqlDbType.Int)]
        Width,
        [Column(SqlDbType.Int)]
        Height
    }

    [View("WashData")]
    public enum WashData
    {
        [Column(SqlDbType.BigInt)]
        Id,
        [Column(SqlDbType.UniqueIdentifier)]
        SessionId,
        [Column(SqlDbType.Int)]
        SequenceNumber,
        [Column(SqlDbType.BigInt)]
        SystemTime,
        [Column(SqlDbType.BigInt)]
        TimeStamp,
        [Column(SqlDbType.VarBinary, -1)]
        Data
    }

    [View("WashSession")]
    public enum WashSession
    {
        [Column(SqlDbType.BigInt)]
        Id,
        [Column(SqlDbType.UniqueIdentifier)]
        SessionId,
        [Column(SqlDbType.SmallInt)]
        PixelFormat,
        [Column(SqlDbType.VarBinary, 2048, true)]
        ColorMap
    }
}
